package com.franklin.ideaplugin.maphelper.col.operation.impl.collection.set;

import com.franklin.ideaplugin.maphelper.col.method.IColQueryMethod;
import com.franklin.ideaplugin.maphelper.col.method.impl.DefaultColQueryMethod;

import java.util.Set;
import java.util.SortedSet;

/**
 * sorted set
 *
 * @author Ye Junhui
 * @since 2024/3/12
 */
public class SortedSetReadWriteOperation extends SetReadWriteOperation {

    @Override
    public String getClassQualifiedName() {
        return SortedSet.class.getName();
    }

    @Override
    public Set<IColQueryMethod> getQueryMethods() {
        Set<IColQueryMethod> queryMethods = super.getQueryMethods();
        queryMethods.add(new DefaultColQueryMethod("subSet", 2, -1));
        queryMethods.add(new DefaultColQueryMethod("headSet", 1, -1));
        queryMethods.add(new DefaultColQueryMethod("tailSet", 1, -1));
        queryMethods.add(new DefaultColQueryMethod("first", 0, -1));
        queryMethods.add(new DefaultColQueryMethod("last", 0, -1));
        return queryMethods;
    }
}
